//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Collections.Generic;
using OpenLS.Core.Serialization;
using OpenLS.Vml.Serialization;

namespace OpenLS.Vml
{
    class Arc : ShapeBase
    {
        private double? _startAngle;
        private double? _endAngle;

        public override void ReadXml(ReadContext context)
        {
            using (var c = context.Read(VmlConstants.VmlNamespace + "arc"))
            {
                _startAngle = c.GetOptionalDouble("startAngle");
                _endAngle = c.GetOptionalDouble("endAngle");
                ReadXmlContent(c);

            }

        }

        public override void WriteXml(WriteContext context)
        {
            using (var c = context.Write(VmlConstants.VmlNamespace + "arc"))
            {
                c.SetOptionalDouble("startAngle", _startAngle);
                c.SetOptionalDouble("endAngle", _endAngle);
                WriteXmlContent(c);
            }

        }
    }
}